
#pragma once//;
#include "GameComponent.hpp"
#include "Property.hpp"
#include "DirtyProperty.hpp"
#include "Matrix4x4.hpp"


namespace Typhoon {
	class Camera : public GameComponent<Camera> {
	public:
		
		Camera();

		Property<Camera*, float> FieldOfView;
		Property<Camera*, float> Aspect;
		Property<Camera*, float> Near;
		Property<Camera*, float> Far;
		
		DirtyProperty<Camera*, Matrix4x4> Projection;
		DirtyProperty<Camera*, Matrix4x4> ProjectionInverse;

	private:
		void CalcProjectionMatrix(DirtyProperty<Camera*, Matrix4x4>::EventData& event);
		void CalcProjectionInverseMatrix(DirtyProperty<Camera*, Matrix4x4>::EventData& event);
		
		void ProjectionPropertyChanged(Camera* camera);

	};
}